import json,sys,os,random
f=open("stocks")
lines = f.readlines()
stocks=list()
for i in lines:
  i=i.strip()
  if len(i) > 5 and i not in stocks:
    stocks.append(i)
random.shuffle(stocks)
nyes=0
print len(stocks)
for st in stocks:
  if nyes>500:
    print "break"
    break
  seq = st.split()
  #count = count+1
  #continue
  #print "----",seq[0]
  if seq[0][0] != '3':
    continue
  flag="sz"
  if seq[0][0] == '6':
    flag="sh"
  stockcode=flag+seq[0]
  os.system("python buypoint.py %s" % (stockcode,))
